package com.casi.project.portal.controller;

import com.casi.framework.web.controller.BaseController;
import com.casi.framework.web.domain.AjaxResult;
import com.casi.project.portal.domain.MobileNotice;
import com.casi.project.portal.service.NoticeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/portal/notice")
public class NoticeController  extends BaseController {
    @Autowired
    private NoticeService noticeService;
    /**
     * 查询公告列表
     * @param
     * @return
     */

    @GetMapping("/getNoticeList")
    public AjaxResult getNoticeList(){
        return  AjaxResult.success(noticeService.getNoticeList());
    }
    /**
     * 根据ID查询公告具体详情
     * @param
     * @return
     */

    @GetMapping("/getNoticeId")
    public AjaxResult getNoticeId(@RequestBody MobileNotice mobileNotice){
       return  AjaxResult.success(noticeService.getNoticeId(mobileNotice));
    }
}
